﻿using System;
using System.Data;
using System.Configuration;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

using Gman.WebApp.ServiceControllers;
using Gman.Entity.Entities;
using System.Web.Mvc;
using System.Collections.Generic;

namespace Gman.WebApp.Models
{
    public class DiagnosticoDetalleModel : BaseModel
    {

        private OperacionServiceController service = new OperacionServiceController();

        public Guid? ID { get; set; }
        public string Action { get; set; }
        public ToolBarModel ToolBar { get; set; }

        public DiagnosticoDetalleBE DiagnosticoDetalle { get; private set; }
        public BajaActivoDetalleModel BajaActivoDetalle { get; set; } // busqueda del activo
        public BienBE Bien { get; set; }


        public DiagnosticoDetalleModel(DiagnosticoDetalleBE diagnosticoDetalle)
        {
            ID = Guid.NewGuid();
            DiagnosticoDetalle = diagnosticoDetalle;

            BajaActivoDetalle = new BajaActivoDetalleModel(new BajaActivoDetalleBE()); // para utilizar el buscador de activo que esta en BajaActivoDetalle

            Bien = new BienBE();
 
        }

         public DiagnosticoDetalleModel(BienBE bien)
        {
            ID = Guid.NewGuid();
            DiagnosticoDetalle = new DiagnosticoDetalleBE();

            BajaActivoDetalle = new BajaActivoDetalleModel(new BajaActivoDetalleBE());

            Bien = bien;
        }


         public DiagnosticoDetalleModel(BienBE bien, DiagnosticoDetalleBE diagnosticoDetalle)
        {
            ID = Guid.NewGuid();
            DiagnosticoDetalle = diagnosticoDetalle;

            BajaActivoDetalle = new BajaActivoDetalleModel(bien,new BajaActivoDetalleBE());

            Bien = bien;
        }

    }
}
